package main.java.game.item.equipableTreasure;

import main.java.game.Battle;
import main.java.game.combatant.Hero;
import main.java.game.item.WeaponType;

public class SpecialWeaponTreasure extends WeaponTreasure implements SpecialObject{
	public SpecialWeaponTreasure (String name, Integer defenseValue, Integer attackValue, Integer initValue, Integer lpValue,Integer sellingPrice, Integer level, WeaponType type){
		super(name,defenseValue,attackValue,initValue,lpValue, sellingPrice,level,type);
		
	}
	public void equip(Hero hero) {
		super.equip(hero);
		hero.getSpecialObjects().add(this);
		hero.getPlayer().getUsedTreasures().add(this);
		hero.getPlayer().getTreasures().remove(this);
	}

	
	public void unequip(Hero hero) {
		super.unequip(hero);
		hero.getSpecialObjects().remove(this);
		hero.getPlayer().getTreasures().add(this);
		hero.getPlayer().getUsedTreasures().remove(this);
		
	}
	
	public void useSpecialHability(Battle battle){
		if(battle.getMonster().getName().toLowerCase().equals("wyvern")){
			battle.getHero().setInit(battle.getHero().getInit()+3);
		}
		
	}
	public void stopUsingSpecialHability(Battle battle){
		if(battle.getMonster().getName().toLowerCase().equals("wyvern")){
			battle.getHero().setInit(battle.getHero().getInit()-3);
		}
		
	}

}
